package com.ly.erms.generator.engine.config;

/**
 * dao模板生成的配置
 * @author liuyang
 * @date 2018年1月15日
 */
public class DaoConfig {
	private ContextConfig contextConfig;

    private String daoPathTemplate;
    private String xmlPathTemplate;

    private String packageName;

    public void init() {
        this.daoPathTemplate = "\\src\\main\\java\\" + contextConfig.getProPackage().replaceAll("\\.", "\\\\") + "\\modular\\" + contextConfig.getModuleName() + "\\dao\\{}Dao.java";
        this.xmlPathTemplate = "\\src\\main\\java\\" + contextConfig.getProPackage().replaceAll("\\.", "\\\\") + "\\modular\\" + contextConfig.getModuleName() + "\\dao\\mapping\\{}Dao.xml";
        this.packageName = contextConfig.getProPackage() + ".modular." + contextConfig.getModuleName() + ".dao";
    }

	public ContextConfig getContextConfig() {
		return contextConfig;
	}

	public void setContextConfig(ContextConfig contextConfig) {
		this.contextConfig = contextConfig;
	}

	public String getDaoPathTemplate() {
		return daoPathTemplate;
	}

	public void setDaoPathTemplate(String daoPathTemplate) {
		this.daoPathTemplate = daoPathTemplate;
	}

	public String getXmlPathTemplate() {
		return xmlPathTemplate;
	}

	public void setXmlPathTemplate(String xmlPathTemplate) {
		this.xmlPathTemplate = xmlPathTemplate;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}
    
}
